package com.hippoframework.test;
import javax.annotation.PostConstruct;

import com.hippoframework.annotation.Autowired;
import com.hippoframework.annotation.Controller;
import com.hippoframework.bean.ApplicationContext;
import com.hippoframework.bean.aware.ApplicationContextAware;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author TylerW
 * @date 1/16/2020 5:52 PM
 */
@Controller
@Slf4j
public class UserController extends AbstractController implements ApplicationContextAware {

    @Autowired
    private User user;
    @Autowired
    private UserService<Customer> userService;
    @Setter
    private ApplicationContext applicationContext;


    @PostConstruct
    public void test() {
        log.info("执行UserController PostConstruct...");
        User bean = applicationContext.getBean(User.class);
        bean.say();
    }


}
